In an internal combustion engine electronically controlled, an exhaust gas sensor (air-fuel ratio sensor or oxygen sensor) for detecting an air-fuel ratio or rich/lean of an exhaust gas is installed in an exhaust pipe, and a fuel injection amount is subjected to a feedback control so that the air-fuel ratio of the exhaust gas matches a target air-fuel ratio on the basis of an output of the exhaust gas sensor. In general, because the exhaust gas sensor is low in detection precision unless a temperature of a sensor element is raised up to an active temperature, the sensor element is heated by a heater incorporated in the exhaust gas sensor to promote the activation of the exhaust gas sensor after the internal combustion engine starts.
However, a water vapor produced by a combustion reaction of fuel and air is included in the exhaust gas of the internal combustion engine. When a temperature of the exhaust pipe is low immediately after the internal combustion engine starts, because the exhaust gas including the water vapor is cooled in the exhaust pipe, the water vapor in the exhaust gas may be condensed in the exhaust pipe, and a condensed water may be generated. For that reason, the condensed water generated in the exhaust pipe is likely to be attached to the sensor element of the exhaust gas sensor immediately after the internal combustion engine starts. When the sensor element is intensely heated by the heater immediately after the internal combustion engine starts, an “element crack” that the sensor element heated to a high temperature is cracked by local cooling (thermal strain) caused by adhesion of the condensed water may occur.
In a heater control device disclosed in Patent Literature 1 (JP-A-2007-120390), a preheating control for setting an energization duty of the heater so as to preheat the sensor element of the exhaust gas sensor at a temperature causing no element crack attributable to water is executed until a predetermined preheating period elapses from a start of the internal combustion engine. Thereafter, after the preheating period has elapsed, the energization duty of the heater is increased to raise the temperature of the sensor element up to the active temperature.
However, in the heater control device disclosed in Patent Literature 1, the energization duty of the heater is maintained at a constant value in performing the preheating control. When the energization duty of the heater is set to be larger, the temperature of the sensor element in the exhaust gas sensor is likely to exceed an element crack prevention temperature upper limit value (an upper limit value of a temperature which can prevent the element crack attributable to the water) during the preheating control. In order to prevent this situation, there is a need to set the energization duty of the heater to be smaller. For that reason, the temperature of the overall sensor element is likely to be insufficiently raised during the preheating control, and a time required until the temperature of the sensor element is raised to the active temperature is lengthened after the completion of the preheating control, resulting in a possibility that the sensor element cannot be activated precociously.